<%@ page language="java" contentType="application/octet-stream;charset=utf-8" %>
<%@ include file="/admin/include/init_admin.jsp" %>
<%@ page import="com.welfare.admin.call.*" %>
<%
	out.clear();
	out = pageContext.pushBody(); 
	
	
	String excelTitle = "SMS이력";
	
	response.setHeader("Content-Disposition","attachment;filename="+java.net.URLEncoder.encode(excelTitle, "utf-8")+"_"+StringUtil.today()+".xls");
	response.setHeader("Content-Description","JSP Generated Data");
	
	
	
	String dest_info			= StringUtil.nvl(request.getParameter("dest_info"));
	String success_yn			= StringUtil.nvl(request.getParameter("success_yn"));
	String send_date_from		= StringUtil.toHan(request.getParameter("send_date_from"));
	String send_date_to			= StringUtil.toHan(request.getParameter("send_date_to"));
	String subject				= StringUtil.toHan(request.getParameter("subject"));
	String sms_msg				= StringUtil.toHan(request.getParameter("sms_msg"));
	
	HashMap infos = new HashMap();
	infos.put("dest_info", 	dest_info);
	infos.put("success_yn", 	success_yn);
	infos.put("send_date_from", send_date_from);
	infos.put("send_date_to", 	send_date_to);
	infos.put("subject", 		subject);
	infos.put("sms_msg", 		sms_msg);
	


	CallDAO dao 	= new CallDAO();
	HashList list 	= dao.selectSmsList(infos);

	list.setHeader("dest_info", 	"수신번호",	MetaData.ALIGN_LEFT);
	list.setHeader("sms_msg", 		"발송내용",	MetaData.ALIGN_LEFT);
	list.setHeader("success_yn", 	"전송결과",	MetaData.ALIGN_CENTER);
	list.setHeader("send_date", 		"전송일자",	MetaData.ALIGN_CENTER);
	
	list.writeToExcel(response, excelTitle);
%>
						
